﻿using InventoryIssue.API.Read.Application.Command.CharHub;
using InventoryIssue.Dtos;
using InventoryIssue.ErrorCode;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace InventoryIssue.API.Read.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ChatHubController : ControllerBase
    {
        private readonly IMediator mediator;

        public ChatHubController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        [HttpGet]
        public async Task<APIResult<List<StorageStockDto>>> GetStorageStock([FromQuery]GetStorageStockCommand request)
        {
            return await mediator.Send(request);
        }
    }
}
